
/**
 * This is a generated class and is not intended for modification.  
 */
package com.model.valueObjects
{
import com.adobe.fiber.styles.IStyle;
import com.adobe.fiber.styles.Style;
import com.adobe.fiber.styles.StyleValidator;
import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import mx.events.ValidationResultEvent;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IModelType;
import mx.events.PropertyChangeEvent;

use namespace model_internal;

[ExcludeClass]
internal class _VOUserMasterEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
{
    private static var emptyArray:Array = new Array();

    model_internal static var allProperties:Array = new Array("user_dob", "cre_datetime", "user_image_fk", "emp_id", "serialnumber", "user_email", "cre_userid", "contact_number", "user_name", "user_role", "isactive", "user_designation", "login_name", "activestatus", "user_password", "user_department");
    model_internal static var allAssociationProperties:Array = new Array();
    model_internal static var allRequiredProperties:Array = new Array("user_dob", "cre_datetime", "user_image_fk", "emp_id", "serialnumber", "user_email", "cre_userid", "contact_number", "user_name", "user_role", "isactive", "user_designation", "login_name", "activestatus", "user_password", "user_department");
    model_internal static var allAlwaysAvailableProperties:Array = new Array("user_dob", "cre_datetime", "user_image_fk", "emp_id", "serialnumber", "user_email", "cre_userid", "contact_number", "user_name", "user_role", "isactive", "user_designation", "login_name", "activestatus", "user_password", "user_department");
    model_internal static var guardedProperties:Array = new Array();
    model_internal static var dataProperties:Array = new Array("user_dob", "cre_datetime", "user_image_fk", "emp_id", "serialnumber", "user_email", "cre_userid", "contact_number", "user_name", "user_role", "isactive", "user_designation", "login_name", "activestatus", "user_password", "user_department");
    model_internal static var derivedProperties:Array = new Array();
    model_internal static var collectionProperties:Array = new Array();
    model_internal static var collectionBaseMap:Object;
    model_internal static var entityName:String = "VOUserMaster";
    model_internal static var dependentsOnMap:Object;
    model_internal static var dependedOnServices:Array = new Array();

    
    model_internal var _user_dobIsValid:Boolean;
    model_internal var _user_dobValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _user_dobIsValidCacheInitialized:Boolean = false;
    model_internal var _user_dobValidationFailureMessages:Array;
    
    model_internal var _cre_datetimeIsValid:Boolean;
    model_internal var _cre_datetimeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _cre_datetimeIsValidCacheInitialized:Boolean = false;
    model_internal var _cre_datetimeValidationFailureMessages:Array;
    
    model_internal var _emp_idIsValid:Boolean;
    model_internal var _emp_idValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _emp_idIsValidCacheInitialized:Boolean = false;
    model_internal var _emp_idValidationFailureMessages:Array;
    
    model_internal var _user_emailIsValid:Boolean;
    model_internal var _user_emailValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _user_emailIsValidCacheInitialized:Boolean = false;
    model_internal var _user_emailValidationFailureMessages:Array;
    
    model_internal var _contact_numberIsValid:Boolean;
    model_internal var _contact_numberValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _contact_numberIsValidCacheInitialized:Boolean = false;
    model_internal var _contact_numberValidationFailureMessages:Array;
    
    model_internal var _user_nameIsValid:Boolean;
    model_internal var _user_nameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _user_nameIsValidCacheInitialized:Boolean = false;
    model_internal var _user_nameValidationFailureMessages:Array;
    
    model_internal var _user_roleIsValid:Boolean;
    model_internal var _user_roleValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _user_roleIsValidCacheInitialized:Boolean = false;
    model_internal var _user_roleValidationFailureMessages:Array;
    
    model_internal var _user_designationIsValid:Boolean;
    model_internal var _user_designationValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _user_designationIsValidCacheInitialized:Boolean = false;
    model_internal var _user_designationValidationFailureMessages:Array;
    
    model_internal var _login_nameIsValid:Boolean;
    model_internal var _login_nameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _login_nameIsValidCacheInitialized:Boolean = false;
    model_internal var _login_nameValidationFailureMessages:Array;
    
    model_internal var _user_passwordIsValid:Boolean;
    model_internal var _user_passwordValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _user_passwordIsValidCacheInitialized:Boolean = false;
    model_internal var _user_passwordValidationFailureMessages:Array;
    
    model_internal var _user_departmentIsValid:Boolean;
    model_internal var _user_departmentValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _user_departmentIsValidCacheInitialized:Boolean = false;
    model_internal var _user_departmentValidationFailureMessages:Array;

    model_internal var _instance:_Super_VOUserMaster;
    model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();

    public function _VOUserMasterEntityMetadata(value : _Super_VOUserMaster)
    {
        // initialize property maps
        if (model_internal::dependentsOnMap == null)
        {
            // depenents map
            model_internal::dependentsOnMap = new Object();
            model_internal::dependentsOnMap["user_dob"] = new Array();
            model_internal::dependentsOnMap["cre_datetime"] = new Array();
            model_internal::dependentsOnMap["user_image_fk"] = new Array();
            model_internal::dependentsOnMap["emp_id"] = new Array();
            model_internal::dependentsOnMap["serialnumber"] = new Array();
            model_internal::dependentsOnMap["user_email"] = new Array();
            model_internal::dependentsOnMap["cre_userid"] = new Array();
            model_internal::dependentsOnMap["contact_number"] = new Array();
            model_internal::dependentsOnMap["user_name"] = new Array();
            model_internal::dependentsOnMap["user_role"] = new Array();
            model_internal::dependentsOnMap["isactive"] = new Array();
            model_internal::dependentsOnMap["user_designation"] = new Array();
            model_internal::dependentsOnMap["login_name"] = new Array();
            model_internal::dependentsOnMap["activestatus"] = new Array();
            model_internal::dependentsOnMap["user_password"] = new Array();
            model_internal::dependentsOnMap["user_department"] = new Array();

            // collection base map
            model_internal::collectionBaseMap = new Object()
        }

        model_internal::_instance = value;
        model_internal::_user_dobValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUser_dob);
        model_internal::_user_dobValidator.required = true;
        model_internal::_user_dobValidator.requiredFieldError = "user_dob is required";
        //model_internal::_user_dobValidator.source = model_internal::_instance;
        //model_internal::_user_dobValidator.property = "user_dob";
        model_internal::_cre_datetimeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCre_datetime);
        model_internal::_cre_datetimeValidator.required = true;
        model_internal::_cre_datetimeValidator.requiredFieldError = "cre_datetime is required";
        //model_internal::_cre_datetimeValidator.source = model_internal::_instance;
        //model_internal::_cre_datetimeValidator.property = "cre_datetime";
        model_internal::_emp_idValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForEmp_id);
        model_internal::_emp_idValidator.required = true;
        model_internal::_emp_idValidator.requiredFieldError = "emp_id is required";
        //model_internal::_emp_idValidator.source = model_internal::_instance;
        //model_internal::_emp_idValidator.property = "emp_id";
        model_internal::_user_emailValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUser_email);
        model_internal::_user_emailValidator.required = true;
        model_internal::_user_emailValidator.requiredFieldError = "user_email is required";
        //model_internal::_user_emailValidator.source = model_internal::_instance;
        //model_internal::_user_emailValidator.property = "user_email";
        model_internal::_contact_numberValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForContact_number);
        model_internal::_contact_numberValidator.required = true;
        model_internal::_contact_numberValidator.requiredFieldError = "contact_number is required";
        //model_internal::_contact_numberValidator.source = model_internal::_instance;
        //model_internal::_contact_numberValidator.property = "contact_number";
        model_internal::_user_nameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUser_name);
        model_internal::_user_nameValidator.required = true;
        model_internal::_user_nameValidator.requiredFieldError = "user_name is required";
        //model_internal::_user_nameValidator.source = model_internal::_instance;
        //model_internal::_user_nameValidator.property = "user_name";
        model_internal::_user_roleValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUser_role);
        model_internal::_user_roleValidator.required = true;
        model_internal::_user_roleValidator.requiredFieldError = "user_role is required";
        //model_internal::_user_roleValidator.source = model_internal::_instance;
        //model_internal::_user_roleValidator.property = "user_role";
        model_internal::_user_designationValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUser_designation);
        model_internal::_user_designationValidator.required = true;
        model_internal::_user_designationValidator.requiredFieldError = "user_designation is required";
        //model_internal::_user_designationValidator.source = model_internal::_instance;
        //model_internal::_user_designationValidator.property = "user_designation";
        model_internal::_login_nameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForLogin_name);
        model_internal::_login_nameValidator.required = true;
        model_internal::_login_nameValidator.requiredFieldError = "login_name is required";
        //model_internal::_login_nameValidator.source = model_internal::_instance;
        //model_internal::_login_nameValidator.property = "login_name";
        model_internal::_user_passwordValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUser_password);
        model_internal::_user_passwordValidator.required = true;
        model_internal::_user_passwordValidator.requiredFieldError = "user_password is required";
        //model_internal::_user_passwordValidator.source = model_internal::_instance;
        //model_internal::_user_passwordValidator.property = "user_password";
        model_internal::_user_departmentValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUser_department);
        model_internal::_user_departmentValidator.required = true;
        model_internal::_user_departmentValidator.requiredFieldError = "user_department is required";
        //model_internal::_user_departmentValidator.source = model_internal::_instance;
        //model_internal::_user_departmentValidator.property = "user_department";
    }

    override public function getEntityName():String
    {
        return model_internal::entityName;
    }

    override public function getProperties():Array
    {
        return model_internal::allProperties;
    }

    override public function getAssociationProperties():Array
    {
        return model_internal::allAssociationProperties;
    }

    override public function getRequiredProperties():Array
    {
         return model_internal::allRequiredProperties;   
    }

    override public function getDataProperties():Array
    {
        return model_internal::dataProperties;
    }

    override public function getGuardedProperties():Array
    {
        return model_internal::guardedProperties;
    }

    override public function getUnguardedProperties():Array
    {
        return model_internal::allAlwaysAvailableProperties;
    }

    override public function getDependants(propertyName:String):Array
    {
       if (model_internal::dataProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a data property of entity VOUserMaster");  
            
       return model_internal::dependentsOnMap[propertyName] as Array;  
    }

    override public function getDependedOnServices():Array
    {
        return model_internal::dependedOnServices;
    }

    override public function getCollectionProperties():Array
    {
        return model_internal::collectionProperties;
    }

    override public function getCollectionBase(propertyName:String):String
    {
        if (model_internal::collectionProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a collection property of entity VOUserMaster");  

        return model_internal::collectionBaseMap[propertyName];
    }

    override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
    {
        return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
    }

    override public function getValue(propertyName:String):*
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VOUserMaster");
        }

        return model_internal::_instance[propertyName];
    }

    override public function setValue(propertyName:String, value:*):void
    {
        if (model_internal::dataProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " is not a data property of entity VOUserMaster");
        }

        model_internal::_instance[propertyName] = value;
    }

    override public function getMappedByProperty(associationProperty:String):String
    {
        switch(associationProperty)
        {
            default:
            {
                return null;
            }
        }
    }

    override public function getPropertyLength(propertyName:String):int
    {
        switch(propertyName)
        {
            default:
            {
                return 0;
            }
        }
    }

    override public function isAvailable(propertyName:String):Boolean
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VOUserMaster");
        }

        if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
        {
            return true;
        }

        switch(propertyName)
        {
            default:
            {
                return true;
            }
        }
    }

    override public function getIdentityMap():Object
    {
        var returnMap:Object = new Object();

        return returnMap;
    }

    [Bindable(event="propertyChange")]
    override public function get invalidConstraints():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_invalidConstraints;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_invalidConstraints;        
        }
    }

    [Bindable(event="propertyChange")]
    override public function get validationFailureMessages():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
    }

    override public function getDependantInvalidConstraints(propertyName:String):Array
    {
        var dependants:Array = getDependants(propertyName);
        if (dependants.length == 0)
        {
            return emptyArray;
        }

        var currentlyInvalid:Array = invalidConstraints;
        if (currentlyInvalid.length == 0)
        {
            return emptyArray;
        }

        var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
        {
            return dependants.indexOf(element) > -1;
        }

        return currentlyInvalid.filter(filterFunc);
    }

    /**
     * isValid
     */
    [Bindable(event="propertyChange")] 
    public function get isValid() : Boolean
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_isValid;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_isValid;
        }
    }

    [Bindable(event="propertyChange")]
    public function get isUser_dobAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCre_datetimeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUser_image_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isEmp_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isSerialnumberAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUser_emailAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCre_useridAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isContact_numberAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUser_nameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUser_roleAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isIsactiveAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUser_designationAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isLogin_nameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isActivestatusAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUser_passwordAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUser_departmentAvailable():Boolean
    {
        return true;
    }


    /**
     * derived property recalculation
     */
    public function invalidateDependentOnUser_dob():void
    {
        if (model_internal::_user_dobIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUser_dob = null;
            model_internal::calculateUser_dobIsValid();
        }
    }
    public function invalidateDependentOnCre_datetime():void
    {
        if (model_internal::_cre_datetimeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCre_datetime = null;
            model_internal::calculateCre_datetimeIsValid();
        }
    }
    public function invalidateDependentOnEmp_id():void
    {
        if (model_internal::_emp_idIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfEmp_id = null;
            model_internal::calculateEmp_idIsValid();
        }
    }
    public function invalidateDependentOnUser_email():void
    {
        if (model_internal::_user_emailIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUser_email = null;
            model_internal::calculateUser_emailIsValid();
        }
    }
    public function invalidateDependentOnContact_number():void
    {
        if (model_internal::_contact_numberIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfContact_number = null;
            model_internal::calculateContact_numberIsValid();
        }
    }
    public function invalidateDependentOnUser_name():void
    {
        if (model_internal::_user_nameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUser_name = null;
            model_internal::calculateUser_nameIsValid();
        }
    }
    public function invalidateDependentOnUser_role():void
    {
        if (model_internal::_user_roleIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUser_role = null;
            model_internal::calculateUser_roleIsValid();
        }
    }
    public function invalidateDependentOnUser_designation():void
    {
        if (model_internal::_user_designationIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUser_designation = null;
            model_internal::calculateUser_designationIsValid();
        }
    }
    public function invalidateDependentOnLogin_name():void
    {
        if (model_internal::_login_nameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfLogin_name = null;
            model_internal::calculateLogin_nameIsValid();
        }
    }
    public function invalidateDependentOnUser_password():void
    {
        if (model_internal::_user_passwordIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUser_password = null;
            model_internal::calculateUser_passwordIsValid();
        }
    }
    public function invalidateDependentOnUser_department():void
    {
        if (model_internal::_user_departmentIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUser_department = null;
            model_internal::calculateUser_departmentIsValid();
        }
    }

    model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
    {
        this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
    }

    [Bindable(event="propertyChange")]   
    public function get user_dobStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get user_dobValidator() : StyleValidator
    {
        return model_internal::_user_dobValidator;
    }

    model_internal function set _user_dobIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_user_dobIsValid;         
        if (oldValue !== value)
        {
            model_internal::_user_dobIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_dobIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get user_dobIsValid():Boolean
    {
        if (!model_internal::_user_dobIsValidCacheInitialized)
        {
            model_internal::calculateUser_dobIsValid();
        }

        return model_internal::_user_dobIsValid;
    }

    model_internal function calculateUser_dobIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_user_dobValidator.validate(model_internal::_instance.user_dob)
        model_internal::_user_dobIsValid_der = (valRes.results == null);
        model_internal::_user_dobIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::user_dobValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::user_dobValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get user_dobValidationFailureMessages():Array
    {
        if (model_internal::_user_dobValidationFailureMessages == null)
            model_internal::calculateUser_dobIsValid();

        return _user_dobValidationFailureMessages;
    }

    model_internal function set user_dobValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_user_dobValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_user_dobValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_dobValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get cre_datetimeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get cre_datetimeValidator() : StyleValidator
    {
        return model_internal::_cre_datetimeValidator;
    }

    model_internal function set _cre_datetimeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_cre_datetimeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_cre_datetimeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_datetimeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get cre_datetimeIsValid():Boolean
    {
        if (!model_internal::_cre_datetimeIsValidCacheInitialized)
        {
            model_internal::calculateCre_datetimeIsValid();
        }

        return model_internal::_cre_datetimeIsValid;
    }

    model_internal function calculateCre_datetimeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_cre_datetimeValidator.validate(model_internal::_instance.cre_datetime)
        model_internal::_cre_datetimeIsValid_der = (valRes.results == null);
        model_internal::_cre_datetimeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::cre_datetimeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::cre_datetimeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get cre_datetimeValidationFailureMessages():Array
    {
        if (model_internal::_cre_datetimeValidationFailureMessages == null)
            model_internal::calculateCre_datetimeIsValid();

        return _cre_datetimeValidationFailureMessages;
    }

    model_internal function set cre_datetimeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_cre_datetimeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_cre_datetimeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_datetimeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get user_image_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get emp_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get emp_idValidator() : StyleValidator
    {
        return model_internal::_emp_idValidator;
    }

    model_internal function set _emp_idIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_emp_idIsValid;         
        if (oldValue !== value)
        {
            model_internal::_emp_idIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "emp_idIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get emp_idIsValid():Boolean
    {
        if (!model_internal::_emp_idIsValidCacheInitialized)
        {
            model_internal::calculateEmp_idIsValid();
        }

        return model_internal::_emp_idIsValid;
    }

    model_internal function calculateEmp_idIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_emp_idValidator.validate(model_internal::_instance.emp_id)
        model_internal::_emp_idIsValid_der = (valRes.results == null);
        model_internal::_emp_idIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::emp_idValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::emp_idValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get emp_idValidationFailureMessages():Array
    {
        if (model_internal::_emp_idValidationFailureMessages == null)
            model_internal::calculateEmp_idIsValid();

        return _emp_idValidationFailureMessages;
    }

    model_internal function set emp_idValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_emp_idValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_emp_idValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "emp_idValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get serialnumberStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get user_emailStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get user_emailValidator() : StyleValidator
    {
        return model_internal::_user_emailValidator;
    }

    model_internal function set _user_emailIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_user_emailIsValid;         
        if (oldValue !== value)
        {
            model_internal::_user_emailIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_emailIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get user_emailIsValid():Boolean
    {
        if (!model_internal::_user_emailIsValidCacheInitialized)
        {
            model_internal::calculateUser_emailIsValid();
        }

        return model_internal::_user_emailIsValid;
    }

    model_internal function calculateUser_emailIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_user_emailValidator.validate(model_internal::_instance.user_email)
        model_internal::_user_emailIsValid_der = (valRes.results == null);
        model_internal::_user_emailIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::user_emailValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::user_emailValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get user_emailValidationFailureMessages():Array
    {
        if (model_internal::_user_emailValidationFailureMessages == null)
            model_internal::calculateUser_emailIsValid();

        return _user_emailValidationFailureMessages;
    }

    model_internal function set user_emailValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_user_emailValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_user_emailValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_emailValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get cre_useridStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get contact_numberStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get contact_numberValidator() : StyleValidator
    {
        return model_internal::_contact_numberValidator;
    }

    model_internal function set _contact_numberIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_contact_numberIsValid;         
        if (oldValue !== value)
        {
            model_internal::_contact_numberIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "contact_numberIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get contact_numberIsValid():Boolean
    {
        if (!model_internal::_contact_numberIsValidCacheInitialized)
        {
            model_internal::calculateContact_numberIsValid();
        }

        return model_internal::_contact_numberIsValid;
    }

    model_internal function calculateContact_numberIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_contact_numberValidator.validate(model_internal::_instance.contact_number)
        model_internal::_contact_numberIsValid_der = (valRes.results == null);
        model_internal::_contact_numberIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::contact_numberValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::contact_numberValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get contact_numberValidationFailureMessages():Array
    {
        if (model_internal::_contact_numberValidationFailureMessages == null)
            model_internal::calculateContact_numberIsValid();

        return _contact_numberValidationFailureMessages;
    }

    model_internal function set contact_numberValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_contact_numberValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_contact_numberValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "contact_numberValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get user_nameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get user_nameValidator() : StyleValidator
    {
        return model_internal::_user_nameValidator;
    }

    model_internal function set _user_nameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_user_nameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_user_nameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_nameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get user_nameIsValid():Boolean
    {
        if (!model_internal::_user_nameIsValidCacheInitialized)
        {
            model_internal::calculateUser_nameIsValid();
        }

        return model_internal::_user_nameIsValid;
    }

    model_internal function calculateUser_nameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_user_nameValidator.validate(model_internal::_instance.user_name)
        model_internal::_user_nameIsValid_der = (valRes.results == null);
        model_internal::_user_nameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::user_nameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::user_nameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get user_nameValidationFailureMessages():Array
    {
        if (model_internal::_user_nameValidationFailureMessages == null)
            model_internal::calculateUser_nameIsValid();

        return _user_nameValidationFailureMessages;
    }

    model_internal function set user_nameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_user_nameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_user_nameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_nameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get user_roleStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get user_roleValidator() : StyleValidator
    {
        return model_internal::_user_roleValidator;
    }

    model_internal function set _user_roleIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_user_roleIsValid;         
        if (oldValue !== value)
        {
            model_internal::_user_roleIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_roleIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get user_roleIsValid():Boolean
    {
        if (!model_internal::_user_roleIsValidCacheInitialized)
        {
            model_internal::calculateUser_roleIsValid();
        }

        return model_internal::_user_roleIsValid;
    }

    model_internal function calculateUser_roleIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_user_roleValidator.validate(model_internal::_instance.user_role)
        model_internal::_user_roleIsValid_der = (valRes.results == null);
        model_internal::_user_roleIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::user_roleValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::user_roleValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get user_roleValidationFailureMessages():Array
    {
        if (model_internal::_user_roleValidationFailureMessages == null)
            model_internal::calculateUser_roleIsValid();

        return _user_roleValidationFailureMessages;
    }

    model_internal function set user_roleValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_user_roleValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_user_roleValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_roleValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get isactiveStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get user_designationStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get user_designationValidator() : StyleValidator
    {
        return model_internal::_user_designationValidator;
    }

    model_internal function set _user_designationIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_user_designationIsValid;         
        if (oldValue !== value)
        {
            model_internal::_user_designationIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_designationIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get user_designationIsValid():Boolean
    {
        if (!model_internal::_user_designationIsValidCacheInitialized)
        {
            model_internal::calculateUser_designationIsValid();
        }

        return model_internal::_user_designationIsValid;
    }

    model_internal function calculateUser_designationIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_user_designationValidator.validate(model_internal::_instance.user_designation)
        model_internal::_user_designationIsValid_der = (valRes.results == null);
        model_internal::_user_designationIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::user_designationValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::user_designationValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get user_designationValidationFailureMessages():Array
    {
        if (model_internal::_user_designationValidationFailureMessages == null)
            model_internal::calculateUser_designationIsValid();

        return _user_designationValidationFailureMessages;
    }

    model_internal function set user_designationValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_user_designationValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_user_designationValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_designationValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get login_nameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get login_nameValidator() : StyleValidator
    {
        return model_internal::_login_nameValidator;
    }

    model_internal function set _login_nameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_login_nameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_login_nameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "login_nameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get login_nameIsValid():Boolean
    {
        if (!model_internal::_login_nameIsValidCacheInitialized)
        {
            model_internal::calculateLogin_nameIsValid();
        }

        return model_internal::_login_nameIsValid;
    }

    model_internal function calculateLogin_nameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_login_nameValidator.validate(model_internal::_instance.login_name)
        model_internal::_login_nameIsValid_der = (valRes.results == null);
        model_internal::_login_nameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::login_nameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::login_nameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get login_nameValidationFailureMessages():Array
    {
        if (model_internal::_login_nameValidationFailureMessages == null)
            model_internal::calculateLogin_nameIsValid();

        return _login_nameValidationFailureMessages;
    }

    model_internal function set login_nameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_login_nameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_login_nameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "login_nameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get activestatusStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get user_passwordStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get user_passwordValidator() : StyleValidator
    {
        return model_internal::_user_passwordValidator;
    }

    model_internal function set _user_passwordIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_user_passwordIsValid;         
        if (oldValue !== value)
        {
            model_internal::_user_passwordIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_passwordIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get user_passwordIsValid():Boolean
    {
        if (!model_internal::_user_passwordIsValidCacheInitialized)
        {
            model_internal::calculateUser_passwordIsValid();
        }

        return model_internal::_user_passwordIsValid;
    }

    model_internal function calculateUser_passwordIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_user_passwordValidator.validate(model_internal::_instance.user_password)
        model_internal::_user_passwordIsValid_der = (valRes.results == null);
        model_internal::_user_passwordIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::user_passwordValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::user_passwordValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get user_passwordValidationFailureMessages():Array
    {
        if (model_internal::_user_passwordValidationFailureMessages == null)
            model_internal::calculateUser_passwordIsValid();

        return _user_passwordValidationFailureMessages;
    }

    model_internal function set user_passwordValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_user_passwordValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_user_passwordValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_passwordValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get user_departmentStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get user_departmentValidator() : StyleValidator
    {
        return model_internal::_user_departmentValidator;
    }

    model_internal function set _user_departmentIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_user_departmentIsValid;         
        if (oldValue !== value)
        {
            model_internal::_user_departmentIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_departmentIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get user_departmentIsValid():Boolean
    {
        if (!model_internal::_user_departmentIsValidCacheInitialized)
        {
            model_internal::calculateUser_departmentIsValid();
        }

        return model_internal::_user_departmentIsValid;
    }

    model_internal function calculateUser_departmentIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_user_departmentValidator.validate(model_internal::_instance.user_department)
        model_internal::_user_departmentIsValid_der = (valRes.results == null);
        model_internal::_user_departmentIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::user_departmentValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::user_departmentValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get user_departmentValidationFailureMessages():Array
    {
        if (model_internal::_user_departmentValidationFailureMessages == null)
            model_internal::calculateUser_departmentIsValid();

        return _user_departmentValidationFailureMessages;
    }

    model_internal function set user_departmentValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_user_departmentValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_user_departmentValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_departmentValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }


     /**
     * 
     * @inheritDoc 
     */ 
     override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
     {
         switch(propertyName)
         {
            default:
            {
                return null;
            }
         }
     }
     
     /**
     * 
     * @inheritDoc 
     *  
     */  
     override public function getPropertyValidationFailureMessages(propertyName:String):Array
     {
         switch(propertyName)
         {
            case("user_dob"):
            {
                return user_dobValidationFailureMessages;
            }
            case("cre_datetime"):
            {
                return cre_datetimeValidationFailureMessages;
            }
            case("emp_id"):
            {
                return emp_idValidationFailureMessages;
            }
            case("user_email"):
            {
                return user_emailValidationFailureMessages;
            }
            case("contact_number"):
            {
                return contact_numberValidationFailureMessages;
            }
            case("user_name"):
            {
                return user_nameValidationFailureMessages;
            }
            case("user_role"):
            {
                return user_roleValidationFailureMessages;
            }
            case("user_designation"):
            {
                return user_designationValidationFailureMessages;
            }
            case("login_name"):
            {
                return login_nameValidationFailureMessages;
            }
            case("user_password"):
            {
                return user_passwordValidationFailureMessages;
            }
            case("user_department"):
            {
                return user_departmentValidationFailureMessages;
            }
            default:
            {
                return emptyArray;
            }
         }
     }

}

}
